package com.optimatch.ui.controler.listeners;

import java.awt.CardLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

import javax.swing.JPanel;

public class ComboBoxChoiceListener implements ItemListener {

	private JPanel cardLayoutPanel;
	
	public ComboBoxChoiceListener(JPanel cardLayoutPanel) {
		this.cardLayoutPanel = cardLayoutPanel;
	}
	
	@Override
	public void itemStateChanged(ItemEvent evt) {
		 CardLayout cl = (CardLayout)(cardLayoutPanel.getLayout());
	     cl.show(cardLayoutPanel, (String)evt.getItem());
	}



}
